﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using Sub.Function;

namespace Model.Sys
{
    public class DataSys : DataSysDataContext, IDisposable
    {
             #region IDispose member
        /// <summary>
        /// get connection string
        /// </summary>
        public DataSys()
            : base(ConfigurationManager.ConnectionStrings["Gemini"].ConnectionString)
        {

        }
        /// <summary>
        /// get, set handle permit entry
        /// </summary>
        public object PermitHandle { get; set; }
        public ActionService Action { get; set; }
        public PageFilter Filter { get; set; }
        /// <summary>
        /// dispose resource
        /// </summary>
        void IDisposable.Dispose()
        {
            Connection.Close();
            Connection.Dispose();
            GC.SuppressFinalize(this);
        }

        #endregion
    }
}
